<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <button @click="but1Click()">按钮1</button>
        <button @click="but1Click('哈哈哈哈哈')">按钮2</button>
        <button @click="but1Click">按钮3</button>
        <button @click="but1Click(message)">按钮4</button>
        <button @click="but1Click(msg)">按钮5</button>
        <button @click="but1Click(event)">按钮6</button>
        <button @click="but1Click($event)">按钮7</button>
    </div>

    <script>
        //创建Vue实例,得到 ViewModel
        var vm = new Vue({
            el: '#app',
            data: {
                message:"message"
            },
            methods: {
                but1Click(mes){
                    console.log(mes);
                }
            }
        });
    </script>
</body>

</html>